package com.qingsong.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * @author qingsong
 */
@Schema(description = "角色添加DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class RoleInsertDTO implements Serializable {

    @NotEmpty(message = "角色名称不能为空!")
    @Schema(description = "角色名称")
    private String title;


    @Size(min = 1, max = 512, message = "描述长度必须在1~256之间")
    @Schema(description = "描述")
    private String info;

}
